home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIExpatSink.idl < prev    next >
Text File  |  2006-05-08  |  6KB  |  135 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. /**
  41.  * This interface should be implemented by any content sink that wants
  42.  * to get output from expat and do something with it; in other words,
  43.  * by any sink that handles some sort of XML dialect.
  44.  */
  45.  
  46. [scriptable, uuid(1DEEA160-C661-11d5-84CC-0010A4E0C706)]
  47. interface nsIExpatSink : nsISupports 
  48. {
  49.   /**
  50.    * Called to handle the opening tag of an element.
  51.    * @param aName the fully qualified tagname of the element
  52.    * @param aAtts the array of attribute names and values.  There are
  53.    *        aAttsCount/2 names and aAttsCount/2 values, so the total number of
  54.    *        elements in the array is aAttsCount.  The names and values
  55.    *        alternate.  Thus, if we number attributes starting with 0,
  56.    *        aAtts[2*k] is the name of the k-th attribute and aAtts[2*k+1] is
  57.    *        the value of that attribute  Both explicitly specified attributes
  58.    *        and attributes that are defined to have default values in a DTD are
  59.    *        present in aAtts.
  60.    * @param aAttsCount the number of elements in aAtts.
  61.    * @param aIndex If the element has an attribute of type ID, then
  62.    *        aAtts[aIndex] is the name of that attribute.  Otherwise, aIndex
  63.    *        is -1
  64.    * @param aLineNumber the line number of the start tag in the data stream.
  65.    */
  66.   void HandleStartElement(in wstring aName,
  67.                           [array, size_is(aAttsCount)] in wstring aAtts,
  68.                           in unsigned long aAttsCount,
  69.                           in long aIndex,
  70.                           in unsigned long aLineNumber);
  71.  
  72.   /**
  73.    * Called to handle the closing tag of an element.
  74.    * @param aName the fully qualified tagname of the element
  75.    */
  76.   void HandleEndElement(in wstring aName);
  77.  
  78.   /**
  79.    * Called to handle a comment
  80.    * @param aCommentText the text of the comment (not including the
  81.    *        "<!--" and "-->")
  82.    */ 
  83.   void HandleComment(in wstring aCommentText);
  84.  
  85.   /**
  86.    * Called to handle a CDATA section
  87.    * @param aData the text in the CDATA section.  This is null-terminated.
  88.    * @param aLength the length of the aData string
  89.    */
  90.   void HandleCDataSection([size_is(aLength)] in wstring aData, 
  91.                           in unsigned long aLength);
  92.  
  93.   /**
  94.    * Called to handle the doctype declaration
  95.    */
  96.   void HandleDoctypeDecl(in AString aSubset,
  97.                          in AString aName,
  98.                          in AString aSystemId,
  99.                          in AString aPublicId,
  100.                          in nsISupports aCatalogData);
  101.  
  102.   /**
  103.    * Called to handle character data.  Note that this does NOT get
  104.    * called for the contents of CDATA sections.
  105.    * @param aData the data to handle.  aData is NOT NULL-TERMINATED.
  106.    * @param aLength the length of the aData string
  107.    */
  108.   void HandleCharacterData([size_is(aLength)] in wstring aData, 
  109.                            in unsigned long aLength);
  110.  
  111.   /**
  112.    * Called to handle a processing instruction
  113.    * @param aTarget the PI target (e.g. xml-stylesheet)
  114.    * @param aData all the rest of the data in the PI
  115.    */
  116.   void HandleProcessingInstruction(in wstring aTarget, 
  117.                                    in wstring aData);
  118.  
  119.   /**
  120.    * Handle the XML Declaration.
  121.    *
  122.    * @param aVersion    The version string, can be null if not specified.
  123.    * @param aEncoding   The encoding string, can be null if not specified.
  124.    * @param aStandalone -1, 0, or 1 indicating respectively that there was no
  125.    *                    standalone parameter in the declaration, that it was
  126.    *                    given as no, or that it was given as yes.
  127.    */
  128.   void HandleXMLDeclaration(in wstring aVersion,
  129.                             in wstring aEncoding,
  130.                             in long aStandalone);
  131.  
  132.   void ReportError(in wstring aErrorText,
  133.                    in wstring aSourceText);
  134. }; 
  135.